package com.geekaca.d7;

public class TestThis {
    public static void main(String[] args) {
        Car car = new Car();
        car.setName("Tom");
        car.goWith("Jerry");
    }
}

class Car {
    private String name;
    private double price;

    public void setName(String name) {
        this.name = name;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void goWith(String name) {
        System.out.println(this.name + "正在和" + name + "比赛");
    }
}

class Student{
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}